using System;
using System.Diagnostics.Contracts;
using System.ServiceModel.Syndication;
using OpenWaves.Caching;

namespace OpenWaves.Syndication
{
    [ContractClass(typeof(SyndicationFeedLoaderContract))]
    public interface ISyndicationFeedLoader
    {
        SyndicationFeed LoadFeed(Url url);
    }

    [ContractClassFor(typeof(ISyndicationFeedLoader))]
    abstract class SyndicationFeedLoaderContract : ISyndicationFeedLoader
    {
        public SyndicationFeed LoadFeed(Url url)
        {
            Contract.Requires<ArgumentNullException>(url != null);
            Contract.Ensures(Contract.Result<SyndicationFeed>() != null);

            throw new System.NotImplementedException();
        }
    }
}